import React, { Component } from "react";
import { View, StyleSheet } from "react-native";
import PropTypes from "prop-types";

const styles = StyleSheet.create({
  container: {
    left: 0,
    right: 0,
    bottom: 0,
  },
});

export default class KeyboardSpacer extends Component {
  static propTypes = {
    keyboardSpace: PropTypes.number,
  };

  static defaultProps = {
    keyboardSpace: 0,
  };

  render() {
    const { keyboardSpace } = this.props;
    return <View style={[styles.container, { height: ~~keyboardSpace }]} />;
  }
}
